﻿$dh.imgList = {
    items: {},
    add: function(_id, _src) {
        var img = new Image();
        img.src = _src;
        this.items[_id] = img;
    },    
    getItem: function(_src) {
        if (!this.items[_src]) this.add(_src, _src);
        return this.items[_src];
    },    
    remove: function(_id) { delete this.items[_id]; },
    setImage: function(img, src) { img.src = this.getItem(src).src;  },
    dispose: function() { for (var x in this.items) delete this.items[x]; }
};